package com.mindskip.xzs.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author artka
 * @description:
 * @date 2022/9/14 12:11 AM
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@TableName(value = "exam")
public class Exam extends Model<Exam> implements Serializable {

    private static final long serialVersionUID = 5714680288608028778L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 考试名称
     */
    private String name;

    @TableField("paper_id")
    private Integer paperId;
    /**
     * 考试分类
     */
    private String category;
    /**
     * @see com.mindskip.xzs.domain.enums.ExamStatusEnum
     */
    private Integer status;

    /**
     * 考试类型( 1固定考试 4.时段考试)
     */
    private Integer examType;

    /**
     * 是否允许重复考试
     */
    private Boolean repetition;

    /**
     * 考试限制时间 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime limitStartTime;

    /**
     * 考试限制时间 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime limitEndTime;

    /**
     * 考试限制次数
     */
    private Integer limitCount;
    /**
     * 考试学分
     */
    private Integer credit;


    @TableField("create_user")
    private Integer createUser;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    private Boolean deleted;
    /**
     * 考试完成-排名是否已通知
     */
    @TableField("rank_notice")
    private Boolean rankNotice;
    /**
     * 答卷是否展示解析
     */
    @TableField("show_analysis")
    private Boolean showAnalysis;
    /**
     * 答卷是否展示正确答案
     */
    @TableField("show_correct_answer")
    private Boolean showCorrectAnswer;
    /**
     * 答卷是否展示正确答案
     */
    @TableField("auto_done")
    private Boolean autoDone;
    /**
     * 及格分
     */
    @TableField("pass_score")
    private Integer passScore;

    /**
     * 授课人员
     */
    @TableField("teacher_name")
    private String teacherName;
    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime teacherTime;
}
